package lambda;

import java.io.File;
import java.io.FileFilter;

public class LambdDemo {
    public static void main(String[] args) {
        File file1 = new File(".");
        FileFilter fileFilter = new FileFilter() {
            @Override
            public boolean accept(File pathname) {
                return false;
            }
        };
//方法名省略
        FileFilter file = (File pathname) ->{
                return false;
        };
//参数类型省略
        FileFilter file3 = (pathname) ->{
            return false;
        };
//只有一句代码
        FileFilter file4 = (pathname) ->false;
//只有一个参数
//        FileFilter file5 =p->p.getName().startsWith("test");
//        File[] files = file1.listFiles(file5);
//        for (File fil:files){
//            System.out.println(fil.getName());
//        }

    }
}
